#include "Alive.h"

Alive::Alive(boost::asio::ip::address theAddress,std::string port)
{
	std::string adr = theAddress.to_string();
	myClient.reset(new Client(adr,port));
	myClient->Connect();
}

Alive::~Alive(void)
{
	//delete myClient;
}

void Alive::operator ()()
{
	if(myClient->IsConnected())
	{
		PComunicator::DataContainer aContainer;
		aContainer.AddCommand("alive",false);
		myClient->Write(aContainer);
	}
}



